|
![](/i/fill.gif) |
Rafal 'Raf256' Maj wrote:
> Hi,
> if I have an object with already have some texture, how can I discard all
> texture settings from it (strip texture), and apply a new texture to it?
>
> Example:
>
>
> #declare obj =
> union {
> sphere { -x 1 pigment { rgb x } } // ((B))
> sphere { +x 1 pigment { rgb y } } // ((C))
> sphere { +y 1 } sphere { -z .1 }
> pigment { rgb .5 }
> scale 100 rotate y*30
> translate y*100
> }
>
> object {
> obj
> pigment { rgb 1 } // ((A))
> }
>
The most locally applied texture always overrides the more generally
applied one (not vice versa). In your example even if you removed the
pigments to spheres in B and C the pigment ( rgb .5 ) in the union
block would still override A in the object block.
But the intention of your question is not clear. What do you want to do
exactly, avoid the manual editing in the spheres? Are you changing the
texture during an animation? You could use the clock value to adjust
the texture or actually wrap the objects in a macro and pass the texture
that way I suppose.
Post a reply to this message
|
![](/i/fill.gif) |